/**
 * 
 */
package com.beta.common.exception;

/**
 * 在ApiController中需要抛出异常的地方，请使用这个异常
 * 
 * @author vector
 *
 */
public class ControllerException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2999352082755666913L;
	
	/**
	 * 国际化中的code，根据code找到message并返回给客户端
	 */
	private String code = "E000500";

	private Object[] args;

	public ControllerException() {
		super();
	}

	public ControllerException(Throwable e) {
		super(e);
	}
	
	public ControllerException(String code, Object... args) {
		this.code = code;
		this.args = args;
	}
	
	public String getCode() {
		return this.code;
	}
	
}
